package com.topisv.tms.service.buyinfo;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.topisv.tms.entity.User;
import com.topisv.tms.entity.buyinfo.BuyerInfo;
import com.topisv.tms.entity.buyinfo.BuyerInfoSum;
import com.topisv.tms.repository.buyinfo.BuyerInfoDao;

@Component
public class BuyerInfoService {

	@Autowired
	private BuyerInfoDao buyerInfoDao;
	
	@Transactional(readOnly = false)
	public void save(BuyerInfo buyerInfo) {
		buyerInfoDao.save(buyerInfo);
	}
	
	@Transactional(readOnly = true)
	public List<BuyerInfo> getAllBuyerInfo(){
		List<BuyerInfo> list = (List<BuyerInfo>)buyerInfoDao.findAll();
		return list;
	}
	

}
